<template>
  <div class="app-container">
    <el-card>
      <el-row type="flex" justify="center">
        <el-col :span="16">
          <el-card margin="0">
            <el-form ref="form" :model="form" :rules="rules" label-width="110px" label-suffix=":">
              <el-row>
                <el-col :span="24">
                  <div style="font-size: 20px; font-weight: 600; text-align: center; padding-bottom: 15px;"> 自动组卷 </div>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="24">
                  <div class="inforClass">基础信息</div>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="12">
                  <el-form-item label="实践课程" prop="practiceType">
                    <el-select v-model="form.practiceType" placeholder="请选择实践课程" clearable style="width:100%">
                      <el-option v-for="item in practiceTypeList" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="试卷名称" prop="name">
                    <el-input v-model="form.name" placeholder="请输入试卷名称" maxlength="30" />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="12">
                  <el-form-item label="考试时间" prop="dateRangeQuery">
                    <el-date-picker v-model="form.dateRangeQuery" value-format="yyyy-MM-dd" type="daterange"
                      range-separator="-" style="width: 100%" start-placeholder="开始日期" end-placeholder="结束日期"
                      @change="getSemes" @input="$forceUpdate()"></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="所属学期">
                    <el-select v-model="form.semesterConfigId" placeholder="请选择考试时间" style="width:100%">
                      <el-option v-for="item in semesterList" :label="item.name" :value="item.id" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="12">
                  <el-form-item label="答题时长" prop="allTime">
                    <el-input-number size="mini" v-model="form.allTime" :min="0" />分钟
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="24">
                  <div class="inforClass">面向对象</div>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="面向学院" prop="faceXy">
                    <el-select v-model="form.faceXy" clearable @change="handlelistProxy" multiple collapse-tags>
                      <el-option v-for="item in proxyList" :key="item.id" :label="item.name" :value="item.id" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="面向专业" prop="faceZy">
                    <el-select v-model="form.faceZy" clearable @change="handlelistProzy" multiple collapse-tags>
                      <el-option v-for="item in prozyList" :key="item.id" :label="item.name" :value="item.id" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="12">
                  <el-form-item label="面向年级" prop="faceNj">
                    <el-select v-model="form.faceNj" clearable @change="handlelistProNj" multiple collapse-tags>
                      <el-option v-for="item in pronjAllList" :key="item.id" :label="item.name" :value="item.name" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="面向班级" prop="faceBj">
                    <el-select v-model="form.faceBj" clearable @change="handlelistProbj" multiple collapse-tags>
                      <el-option v-for="item in probjList" :key="item.id" :label="item.name" :value="item.id" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="24">
                  <div class="inforClass">试题编辑</div>
                </el-col>
                <el-col :span="24">
                  <el-form-item style="margin-left: -70px;">
                    <div>
                      单选题
                      <el-input-number size="mini" v-model="form.selectNumber" :min="0"
                        @change="numChange(form.selectNumber, 'selectNumber')" />
                      ，每道题目
                      <el-input-number size="mini" v-model="form.selectScore" :min="0"
                        @change="numChange(form.selectScore, 'selectScore')" />
                      积分;
                    </div>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item style="margin-left: -70px;">
                    <div>
                      判断题
                      <el-input-number size="mini" v-model="form.judgeNumber" :min="0"
                        @change="numChange(form.judgeNumber, 'judgeNumber')" />
                      ，每道题目
                      <el-input-number size="mini" v-model="form.judgeScore" :min="0"
                        @change="numChange(form.judgeScore, 'judgeScore')" />
                      积分;
                    </div>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item style="margin-left: -70px;">
                    <div>
                      多选题
                      <el-input-number size="mini" v-model="form.multipleNumber" :min="0"
                        @change="numChange(form.multipleNumber, 'multipleNumber')" />
                      ，每道题目
                      <el-input-number size="mini" v-model="form.multipleScore" :min="0"
                        @change="numChange(form.multipleScore, 'multipleScore')" />
                      积分;
                    </div>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item style="margin-left: -70px;">
                    <div>
                      共计 <span>{{ form.selectNumber + form.judgeNumber + form.multipleNumber }}</span> 道题目, <span>
                        {{
                          (form.selectNumber * form.selectScore) + (form.judgeNumber * form.judgeScore) +
                          (form.multipleNumber * form.multipleScore)
                        }}
                      </span> 积分。
                    </div>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <div style="text-align: center; margin-top: 10px;">
                    <el-button @click="returnBtn">取 消</el-button>
                    <el-button type="primary" @click="submitForm" v-hasPermi="['project:paper:generatePaper']">
                      组 卷
                    </el-button>
                  </div>
                </el-col>
              </el-row>
            </el-form>
          </el-card>
        </el-col>
      </el-row>

      <!-- 试卷详情 -->
      <el-dialog title="预览" width="50%" :visible.sync="open" append-to-body :before-close="beforeClose">
        <el-row>
          <el-col :span="24">
            <div class="inforClass">试题详情</div>
          </el-col>
          <el-col :span="24" v-for="(item, index) in topicList" :key="index">
            <div class="timu">
              <div>{{ index + 1 }}.</div>
              <div style="margin: 0 8px;">[{{ item.type == 1 ? '单选题' : item.type == 2 ? '判断题' : '多选题' }}]</div>
              <div v-html="item.questionContent"></div>
              <div> ({{ item.type == 1 ? form.selectScore : item.type == 2 ? form.judgeScore :
                form.multipleScore }} 分)</div>
            </div>
            <div v-for="it in item.questionBankOptionList" :key="it.name" class="bankLabelStyle">
              <el-checkbox v-model="it.answer" :label="it.name" style="display: block;" class="non-clickable-checkbox" />
              <span> {{ item.name }}. </span>
              <div style="flex: 1" v-html="it.content"></div>
            </div>
            <div>
              <el-form>
                <el-form-item label="答案解析:">
                  <div v-html="item.answerAnalysis"></div>
                </el-form-item>
              </el-form>
            </div>
          </el-col>
        </el-row>
        <div slot="footer" class="dialog-footer">
          <el-button type="danger" @click="handleDelete" v-hasPermi="['project:paper:remove']">删 除</el-button>
          <el-button type="primary" @click="clearForm('确定')">保 存</el-button>
          <el-button type="primary" @click="handleModifyStatus" v-hasPermi="['project:paper:publish']">发 布</el-button>
        </div>
      </el-dialog>
    </el-card>
  </div>
</template>

<script>
import { projectList, typeCongfigList } from "@/api/semesManage";
import { generatePaper, getTestInfo, modifyStatus, modifyDelete } from "@/api/paperInterlocu/paper";
import { listProxy, listProzy, listProbj, pronjList } from "@/api/project/prold";
export default {
  name: "automaticVolume",
  data() {
    return {
      open: false, // 试卷详情对话框是否可见
      proxyList: [], // 学院
      prozyList: [], // 专业
      probjList: [], // 班级
      pronjAllList: [], // 年级
      practiceTypeList: [], // 实践课程
      form: {
        practiceType: '',
        name: '',
        score: 0,
        selectNumber: 0,
        selectScore: 0,
        judgeNumber: 0,
        judgeScore: 0,
        multipleNumber: 0,
        multipleScore: 0,
        allTime: 0,
        dateRangeQuery: [],
      },
      topicList: [], // 试卷题目列表
      // 表单校验
      rules: {
        practiceType: [
          { required: true, message: "请选择实践课程" },
        ],
        name: [
          { required: true, message: "试卷名称不得为空", trigger: "blur" },
        ],
        faceXy: [
          { type: 'array', required: true, message: "请选择学院" },
        ],
        faceZy: [
          { type: 'array', required: true, message: "请选择专业" },
        ],
        faceBj: [
          { type: 'array', required: true, message: "请选择班级" },
        ],
        faceNj: [
          { type: 'array', required: true, message: "请选择年级" },
        ],
        allTime: [
          { required: true, message: "请设置答题时长", trigger: "blur" },
          { validator: this.checkAllTime, trigger: 'blur' }
        ],
        dateRangeQuery: [
          { type: 'array', required: true, message: "请选择考试时间段", trigger: "change" },
        ],
      },
      semesterList: []
    };
  },
  watch: {},
  async created() {
    // const permissList = sessionStorage.getItem('practiceTypes').split(',');
    // const typeMap = {
    //   1: { type: '劳动教育', id: 1 },
    //   2: { type: '职业素养', id: 2 },
    //   3: { type: '应急安全', id: 3 },
    //   4: { type: '思政实践', id: 4 },
    //   5: { type: '创新创业', id: 5 }
    // };

    // permissList.forEach(v => {
    //   if (typeMap[v]) {
    //     this.practiceTypeList.push(typeMap[v]);
    //   }
    // });
    this.getTypeCongfigList();
    await this.getListProxy();
    await this.getListPronj();
  },
  mounted() {
    this.resetForm("form");
  },
  methods: {
    getTypeCongfigList() {
      typeCongfigList({
        pageNum: 1,
        pageSize: 50,
      }).then(res => {
        this.practiceTypeList = res.rows;
      });
    },
    getSemes(e) {
      this.semesterList = [];
      if (e) {
        projectList({
          startTime: e[0] + ' 00:00:00',
        }).then((res) => {
          if (res.code == 200) {
            this.semesterList = res.rows.filter(item => {
              if (
                (new Date(e[1] + ' 23:59:59').getTime() >= new Date(item.startTime).getTime() && new Date(e[1] + ' 23:59:59').getTime() <= new Date(item.endTime).getTime())
                ||
                (new Date(e[0] + ' 00:00:00').getTime() <= new Date(item.startTime).getTime() && new Date(e[1] + ' 23:59:59').getTime() <= new Date(item.endTime).getTime() && new Date(e[1] + ' 23:59:59').getTime() >= new Date(item.startTime).getTime())
                ||
                (new Date(e[0] + ' 00:00:00').getTime() >= new Date(item.startTime).getTime() && new Date(e[1] + ' 23:59:59').getTime() >= new Date(item.endTime).getTime())
              ) {
                return item;
              }
            });
            this.form.semesterConfigId = this.semesterList.length > 0 ? this.semesterList[0].id : null;
          }
        });
      } else {
        this.form.semesterConfigId = null;
      }
    },
    numChange(row, type) {
      if (row === undefined) {
        this.$nextTick(() => {
          this.form[type] = 0;
          this.$forceUpdate();
        });
      }
    },
    // 自定义校验方法
    checkAllTime(rule, value, callback) {
      if (value === 0) {
        callback(new Error('答题时长不能为0'));
      } else {
        callback();
      }
    },
    // 查询学院
    getListProxy() {
      listProxy().then(async (response) => {
        this.proxyList = response.rows;
        if (response.rows.length > 0) {
          this.proxyList.unshift({ name: '全部', id: '999999' });
          this.form.faceXy = ['999999'];
          await this.getListProzy(['999999']);
        };
      });
    },
    // 查询专业
    getListProzy(id) {
      let data = {
        xyIds: [],
      };
      if (id) {
        if (id.includes('999999')) {
          data.xyIds = this.proxyList.map(xyId => xyId.id);
          data.xyIds = data.xyIds.filter(x => x !== '999999');
        } else {
          data.xyIds = id;
        }
      } else {
        data = {};
      }
      listProzy(data).then(async (response) => {
        this.prozyList = [];
        this.prozyList = response.rows;
        if (response.rows.length > 0) {
          this.prozyList.unshift({ name: '全部', id: '99999999' });
          this.form.faceZy = ['99999999'];
          await this.getListProbj(['99999999']);
        };

      });
    },
    // 查询班级
    getListProbj(id) {
      let data = {
        zyIds: [],
        njIds: this.form.faceNj[0] == '全部' ? this.pronjAllList.slice(1).map(v => v.name) : this.form.faceNj,
      };
      if (id) {
        data.zyIds = [];
        if (id.includes('99999999')) {
          data.zyIds = this.prozyList.map(xyId => xyId.id).filter(x => x !== '99999999');
        } else {
          data.zyIds = id;
        }
      }
      listProbj(data).then((response) => {
        this.probjList = [];
        this.probjList = response.rows;
        if (response.rows.length > 0) {
          this.probjList.unshift({ name: '全部', id: '9999999999' });
          this.form.faceBj = ['9999999999'];
        };
      });
    },

    // 查询年级
    getListPronj() {
      pronjList().then((response) => {
        this.pronjAllList = response.rows;
        if (response.rows.length > 0) {
          this.pronjAllList.unshift({ name: '全部', id: '999999999999' });
          this.form.faceNj = ['全部'];
        };
      });
    },
    // 切换学院
    handlelistProxy(id) {
      this.prozyList = [];
      this.probjList = [];
      if (!id) {
        this.form.faceXy = null;
      };
      if (id.length > 0) {
        if (id.length > 1 && id.find(x => x === '999999')) {
          if (this.form.faceXy.find(x => x === '999999') && id[0] == '999999') {
            this.form.faceXy.splice(this.form.faceXy.findIndex(x => x === '999999'), 1);
          }
          if (id.find(x => x === '999999') && id[0] !== '999999') {
            this.form.faceXy = ['999999'];
          }
        }
        if (this.proxyList.length > 0 && this.proxyList[0].id === '999999' && this.proxyList.length - 1 == id.length) {
          this.form.faceXy = ['999999'];
        }
      }
      this.getListProzy(this.form.faceXy);
      this.form.faceZy = null;
      this.form.faceBj = null
    },
    // 切换专业
    handlelistProzy(id) {
      this.probjList = [];
      if (!id) {
        this.form.faceZy = null;
      };
      if (id.length > 0) {
        if (id.length > 1 && id.find(x => x === '99999999')) {
          if (this.form.faceZy.findIndex(x => x === '99999999') >= 0 && id[0] == '99999999') {
            this.form.faceZy.splice(this.form.faceZy.findIndex(x => x === '99999999'), 1);
          }
          if (id.find(x => x === '99999999') && id[0] !== '99999999') {
            this.form.faceZy = ['99999999'];
          }
        }
        if (this.prozyList.length > 0 && this.prozyList[0].id === '99999999' && this.prozyList.length - 1 == id.length) {
          this.form.faceZy = ['99999999'];
        }
        this.getListProbj(this.form.faceZy);
      }
      this.form.faceBj = null;
    },
    // 切换班级
    handlelistProbj(id) {
      if (id.length > 0) {
        if (id.length > 1 && id.find(x => x === '9999999999')) {
          if (this.form.faceBj.findIndex(x => x === '9999999999') >= 0 && id[0] == '9999999999') {
            this.form.faceBj.splice(this.form.faceBj.findIndex(x => x === '9999999999'), 1);
          }
          if (id.find(x => x === '9999999999') && id[0] !== '9999999999') {
            this.form.faceBj = ['9999999999'];
          }
        }
        if (this.probjList.length > 0 && this.probjList[0].id === '9999999999' && this.probjList.length - 1 == id.length) {
          this.form.faceBj = ['9999999999'];
        }
      }
      this.$forceUpdate();
    },
    handlelistProNj(id) {
      this.probjList = [];
      if (!id) {
        this.form.faceNj = null;
      };
      if (id.length > 0) {
        if (id.length > 1 && id.find(x => x === '全部')) {
          if (this.form.faceNj.findIndex(x => x === '全部') >= 0 >= 0 && id[0] == '全部') {
            this.form.faceNj.splice(this.form.faceNj.findIndex(x => x === '全部'), 1);
          }
          if (id.find(x => x === '全部') && id[0] !== '全部') {
            this.form.faceNj = ['全部'];
          }
        }
        if (this.pronjAllList.length > 0 && this.pronjAllList[0].name === '全部' && this.pronjAllList.length - 1 == id.length) {
          this.form.faceNj = ['全部'];
        }
        if (this.prozyList.length > 0) {
          this.form.faceBj = null;
          this.getListProbj(this.form.faceZy);
        }
      }
    },
    // 保 存
    submitForm() {
      this.$refs.form.validate((valid) => {
        if (valid) {
          if (this.probjList.length < 2) {
            this.$modal.msgError("暂无查询班级信息，请先添加班级!");
            return;
          }
          if (this.form.selectNumber == 0 && this.form.judgeNumber == 0 && this.form.multipleNumber == 0) return this.$modal.msgError("至少设置一种类型试题")
          if (this.form.selectNumber > 0 && this.form.selectScore == 0) return this.$modal.msgError("单选题题分至少大于0");
          if (this.form.judgeNumber > 0 && this.form.judgeScore == 0) return this.$modal.msgError("判断题题分至少大于0");
          if (this.form.multipleNumber > 0 && this.form.multipleScore == 0) return this.$modal.msgError("多选题题分至少大于0");
          if (this.form.dateRangeQuery.length === 0) return this.$modal.msgError("请选择时间");
          this.form.startTime = this.form.dateRangeQuery[0] + ' 00:00:00';
          this.form.endTime = this.form.dateRangeQuery[1] + ' 23:59:59';
          this.form.score = (this.form.selectNumber * this.form.selectScore) + (this.form.judgeNumber * this.form.judgeScore) +
            (this.form.multipleNumber * this.form.multipleScore);
          let data = {
            faceXy: this.form.faceXy && this.form.faceXy.find(v => v == '999999') ? [] : this.form.faceXy,
            faceZy: this.form.faceZy && this.form.faceZy.find(v => v == '99999999') ? [] : this.form.faceZy,
            faceNj: this.form.faceNj && this.form.faceNj.find(v => v == '全部') ? [] : this.form.faceNj,
            faceBj: this.form.faceBj && this.form.faceBj.find(v => v == '9999999999') ? [] : this.form.faceBj,
          };
          // 如果没有任何值，使用 proxyList 和其它相关列表的映射值
          if (!data.faceXy && !data.faceZy && !data.faceNj && !data.faceBj) {
            data.faceXy = this.proxyList.map(v => v.id).join(',');
            data.faceZy = this.prozyList.map(v => v.id).join(',');
            data.faceNj = this.pronjAllList.map(v => v.name).join(',');
            data.faceBj = this.probjList.map(v => v.id).join(',');
          } else {
            // 否则，根据每个字段是否存在决定是否 join
            if (data.faceXy.length > 0) {
              data.faceXy = Array.isArray(data.faceXy) ? data.faceXy.join(',') : data.faceXy;
            } else {
              data.faceXy = this.proxyList.slice(1).map(v => v.id).join(',');
            }

            if (data.faceZy.length > 0) {
              data.faceZy = Array.isArray(data.faceZy) ? data.faceZy.join(',') : data.faceZy;
            } else {
              data.faceZy = this.prozyList.slice(1).map(v => v.id).join(',');
            }
            if (data.faceNj.length > 0) {
              data.faceNj = Array.isArray(data.faceNj) ? data.faceNj.join(',') : data.faceNj;
            } else {
              data.faceNj = this.pronjAllList.slice(1).map(v => v.name).join(',');
            }
            if (data.faceBj.length > 0) {
              data.faceBj = Array.isArray(data.faceBj) ? data.faceBj.join(',') : data.faceBj;
            } else {
              data.faceBj = this.probjList.slice(1).map(v => v.id).join(',');
            }
          }

          generatePaper({ ...this.form, ...data }).then(res => {
            if (res.code == 200) {
              // this.handleModifyStatus(res.data);
              this.open = true;
              this.bankId = res.data;
              this.previewBank();
              this.resetForm("form");
              this.$refs.form.resetFields();
            }
          })
        }
      });
    },
    previewBank() {
      getTestInfo({ id: this.bankId }).then(res => {
        res.data.forEach(item => {
          item.questionBankOptionList.forEach(it => {
            it.answer = it.answer == 1 ? true : false;
          });
        })
        this.topicList = res.data;
      })
    },
    async clearForm(type) {
      this.form = {
        practiceType: '',
        name: '',
        score: 0,
        selectNumber: 0,
        selectScore: 0,
        judgeNumber: 0,
        judgeScore: 0,
        multipleNumber: 0,
        multipleScore: 0,
        allTime: 0,
        startTime: null,
        endTime: null,
        score: 0,
        dateRangeQuery: [],
      };
      if (type) {
        this.$modal.msgSuccess("试卷保存成功");
      }
      this.$nextTick(async () => {
        await this.getListProxy();
        await this.getListPronj();
        this.$forceUpdate();
      });
      this.resetForm("form");
      this.open = false;
    },
    handleModifyStatus(id) {
      modifyStatus({ status: 1, id: this.bankId }).then(res => {
        if (res.code == 200) {
          this.clearForm();
          this.$modal.msgSuccess("试卷发布成功");
        }
      })
    },
    beforeClose() {
      this.$modal
        .confirm('关闭弹窗试卷将会被删除, 是否继续？')
        .then(function () {
          return modifyDelete(this.bankId);
        }.bind(this))
        .then(() => {
          this.$modal.msgSuccess("删除成功");
          this.open = false;
        })
        .catch(() => { });
    },
    handleDelete() {
      this.$modal
        .confirm('是否确认删除该试卷？')
        .then(function () {
          return modifyDelete(this.bankId);
        }.bind(this))
        .then(() => {
          this.clearForm();
          this.$modal.msgSuccess("删除成功");
          this.open = false;
        })
        .catch(() => { });
    },

    // 返 回
    returnBtn() {
      let path = this.$route.path;
      const routrIndex = this.$store.state.tagsView.visitedViews.findIndex(item => item.path === path);
      this.$store.state.tagsView.visitedViews.splice(routrIndex, 1);
      this.$router.go(-1);
    },
  },
};
</script>
<style scoped lang="scss">
.bankLabelStyle {
  display: flex;
  align-items: center;
  margin-left: 20px;
  padding: 5px 0;
}

::v-deep p {
  margin: 0 !important;
}

.timu {
  display: flex;
  font-weight: 600;
  align-items: center;
  padding-bottom: 5px;
}

.inforClass {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.inforClass::before {
  content: '';
  width: 5px;
  height: 25px;
  background-color: #419eff;
  margin-right: 10px;
  display: inline-block;
}

/* 设置复选框选中时的样式 */
.non-clickable-checkbox.el-checkbox--is-checked .el-checkbox__input {
  border-color: #409EFF;
  /* 选中时的边框颜色 */
  background-color: #409EFF;
  /* 选中时的背景颜色 */
}

/* 禁止点击，但保持选中样式 */
.non-clickable-checkbox {
  pointer-events: none;
}

/* 保持复选框已选中时的样式不变 */
.non-clickable-checkbox .el-checkbox__input.is-checked {
  background-color: #409EFF;
  /* 选中时背景色 */
  border-color: #409EFF;
  /* 选中时边框色 */
  color: white;
  /* 选中时文字颜色 */
}

/* 使复选框状态保持选中样式 */
.non-clickable-checkbox.el-checkbox--is-checked .el-checkbox__inner {
  background-color: #409EFF !important;
  /* 确保选中时的背景色 */
  border-color: #409EFF !important;
}

/* 保持选中复选框时不改变外观 */
.non-clickable-checkbox.is-checked .el-checkbox__input {
  background-color: #409EFF;
  border-color: #409EFF;
}

// ::v-deep .el-dialog__header {
//   display: none;
// }
::v-deep .el-dialog__body {
  padding-top: 5px !important;
}

::v-deep .el-form-item__content {
  p {
    margin: 0 !important;
  }
}

::v-deep .el-input-number--mini {
  width: 95px !important;
}

::v-deep .el-input__inner {
  padding-left: 5px !important;
  padding-right: 5px !important;
}

::v-deep .el-input-number__decrease {
  display: none !important;
}

::v-deep .el-input-number__increase {
  display: none !important;
}
</style>
